Skip to main content

Admin Functions

This section details the administrative functions available in the contract, including staker management and role transfers.

Presale Staker Management

addPresaleStaker

Function Type: external
Function Signature: addPresaleStaker(address)
Function Selector: 0x6c58f77b

Allows the admin to add a single new presale staker to the contract. Limited to a maximum of 800 total presale stakers.

Parameters

ParameterTypeDescription
_stakeraddressAddress of the new presale staker

Workflow

  1. Verifies the caller has admin privileges
  2. Checks that adding this staker won't exceed the 800 staker limit
  3. Adds the address to the presale stakers list

addPresaleStakers

Function Type: external
Function Signature: addPresaleStakers(address[])
Function Selector: 0xbe100345

Allows the admin to add multiple presale stakers in a single transaction. Limited to a maximum of 800 total presale stakers.

Parameters

ParameterTypeDescription
_stakersaddress[]Array of addresses of new presale stakers

Workflow

  1. Verifies the caller has admin privileges
  2. Checks that adding these stakers won't exceed the 800 staker limit
  3. Adds all addresses to the presale stakers list

Role Transfer Processes

Admin Change Process

The admin role transfer follows a secure two-step process with a mandatory waiting period.

proposeAdmin

Function Type: external
Function Signature: proposeAdmin(address)
Function Selector: 0x147bf6c4

Initiates the admin change process by proposing a new admin address.

Parameters
ParameterTypeDescription
_proposedAdminaddressAddress of the proposed new admin

rejectProposalAdmin

Function Type: external
Function Signature: rejectProposalAdmin()
Function Selector: 0xb38c950a

Allows the current admin to cancel a pending admin change proposal.

acceptNewAdmin

Function Type: external
Function Signature: acceptNewAdmin()
Function Selector: 0xcd6b5460

Allows the proposed admin to accept the role after the waiting period.

Complete Workflow

  1. Proposal Initiation:

    • The current admin calls proposeAdmin to nominate a new admin address
    • A timestamp is recorded to enforce the waiting period
  2. Proposal Cancellation (Optional):

    • The current admin can call rejectProposalAdmin to cancel the proposal at any time
  3. Role Acceptance:

    • The proposed admin must wait 24 hours (1 day) after the proposal timestamp
    • After the waiting period, the proposed admin calls acceptNewAdmin to complete the transfer
    • The function verifies the waiting period has elapsed before transferring admin rights

Admin Change


Golden Fisher Role Transfer

The golden fisher role transfer follows a similar secure two-step process with a mandatory waiting period.

proposeGoldenFisher

Function Type: external
Function Signature: proposeGoldenFisher(address)
Function Selector: 0x489c5ad4

Initiates the golden fisher change process by proposing a new golden fisher address.

Parameters
ParameterTypeDescription
_proposedGoldenFisheraddressAddress of the proposed new golden fisher

rejectProposalGoldenFisher

Function Type: external
Function Signature: rejectProposalGoldenFisher()
Function Selector: 0xa84e9f23

Allows the current golden fisher to cancel a pending golden fisher change proposal.

acceptNewGoldenFisher

Function Type: external
Function Signature: acceptNewGoldenFisher()
Function Selector: 0x34dd90d6

Allows the admin to confirm the new golden fisher role assignment after the waiting period.

Complete Workflow

  1. Proposal Initiation:

    • The current golden fisher calls proposeGoldenFisher to nominate a new golden fisher address
    • A timestamp is recorded to enforce the waiting period
  2. Proposal Cancellation (Optional):

    • The current golden fisher can call rejectProposalGoldenFisher to cancel the proposal at any time
  3. Role Confirmation:

    • The admin must wait 24 hours (1 day) after the proposal timestamp
    • After the waiting period, the admin calls acceptNewGoldenFisher to complete the transfer
    • The function verifies the waiting period has elapsed before transferring golden fisher rights

Golden Fisher Change


Staking Unlock Period Modification

The staking unlock period modification follows a secure two-step process with a mandatory waiting period.

proposeSetSecondsToUnlockStaking

Function Type: external
Function Signature: proposeSetSecondsToUnlockStaking(uint256)
Function Selector: 0x6b2933a2

Initiates the process to change the staking unlock period.

Parameters
ParameterTypeDescription
_secondsToUnlockStakinguint256New staking unlock period in seconds

rejectProposalSetSecondsToUnlockStaking

Function Type: external
Function Signature: rejectProposalSetSecondsToUnlockStaking()
Function Selector: 0x7c25faef

Allows the current admin to cancel a pending staking unlock period change proposal.

acceptSetSecondsToUnlockStaking

Function Type: external
Function Signature: acceptSetSecondsToUnlockStaking()
Function Selector: 0x610a0476

Allows the admin to confirm the new staking unlock period after the waiting period.

Complete Workflow

  1. Proposal Initiation:

    • The admin calls proposeSetSecondsToUnlockStaking to propose a new unlock period value
    • A timestamp is recorded to enforce the waiting period
  2. Proposal Cancellation (Optional):

    • The admin can call rejectProposalSetSecondsToUnlockStaking to cancel the proposal at any time
  3. Change Confirmation:

    • The admin must wait 24 hours (1 day) after the proposal timestamp
    • After the waiting period, the admin calls acceptSetSecondsToUnlockStaking to implement the change
    • The function verifies the waiting period has elapsed before applying the new staking unlock period

Seconds To Unlock Staking Change


Full Unstaking Period Modification

The full unstaking unlock period modification follows a secure two-step process with a mandatory waiting period.

prepareSetSecondsToUnlockFullUnstaking

Function Type: external
Function Signature: prepareSetSecondsToUnllockFullUnstaking(uint256)
Function Selector: 0x3d8ff69a

Initiates the process to change the full unstaking unlock period.

Parameters
ParameterTypeDescription
_secondsToUnlockFullUnstakinguint256New full unstaking unlock period in seconds

cancelSetSecondsToUnlockFullUnstaking

Function Type: external
Function Signature: cancelSetSecondsToUnllockFullUnstaking()
Function Selector: 0xb384c574

Allows the current admin to cancel a pending full unstaking unlock period change proposal.

confirmSetSecondsToUnlockFullUnstaking

Function Type: external
Function Signature: confirmSetSecondsToUnllockFullUnstaking()
Function Selector: 0x8f4b3f28

Allows the admin to confirm the new full unstaking unlock period after the waiting period.

Complete Workflow

  1. Proposal Initiation:

    • The admin calls prepareSetSecondsToUnllockFullUnstaking to propose a new unlock period value
    • A timestamp is recorded to enforce the waiting period
  2. Proposal Cancellation (Optional):

    • The admin can call cancelSetSecondsToUnllockFullUnstaking to cancel the proposal at any time
  3. Change Confirmation:

    • The admin must wait 24 hours (1 day) after the proposal timestamp
    • After the waiting period, the admin calls confirmSetSecondsToUnllockFullUnstaking to implement the change
    • The function verifies the waiting period has elapsed before applying the new full unstaking unlock period

Seconds To Unlock Full Unstaking Change


Flag Change Processes

Public Staking Flag Modification

The public staking flag modification follows a secure two-step process with a mandatory waiting period.

prepareChangeAllowPublicStaking

Function Type: external
Function Signature: prepareChangeAllowPublicStaking()
Function Selector: 0x27be0557

Initiates the process to toggle the allow public staking flag.

cancelChangeAllowPublicStaking

Function Type: external
Function Signature: cancelChangeAllowPublicStaking()
Function Selector: 0xb996b6c4

Allows the current admin to cancel a pending public staking flag change proposal.

confirmChangeAllowPublicStaking

Function Type: external
Function Signature: confirmChangeAllowPublicStaking()
Function Selector: 0x681f02ac

Allows the admin to confirm the new public staking flag state after the waiting period.

Complete Workflow

  1. Proposal Initiation:

    • The admin calls prepareChangeAllowPublicStaking to initiate the change
    • A timestamp is recorded to enforce the waiting period
  2. Proposal Cancellation (Optional):

    • The admin can call cancelChangeAllowPublicStaking to cancel the proposal at any time
  3. Change Confirmation:

    • The admin must wait 24 hours (1 day) after the proposal timestamp
    • After the waiting period, the admin calls confirmChangeAllowPublicStaking to implement the change
    • The function verifies the waiting period has elapsed before toggling the public staking flag

Allow Public Staking Change


Presale Staking Flag Modification

The presale staking flag modification follows a secure two-step process with a mandatory waiting period.

prepareChangeAllowPresaleStaking

Function Type: external
Function Signature: prepareChangeAllowPresaleStaking()
Function Selector: 0xdfb2b3a4

Initiates the process to toggle the allow presale staking flag.

cancelChangeAllowPresaleStaking

Function Type: external
Function Signature: cancelChangeAllowPresaleStaking()
Function Selector: 0x7068dc65

Allows the current admin to cancel a pending presale staking flag change proposal.

confirmChangeAllowPresaleStaking

Function Type: external
Function Signature: confirmChangeAllowPresaleStaking()
Function Selector: 0x1e9c210f

Allows the admin to confirm the new presale staking flag state after the waiting period.

Complete Workflow

  1. Proposal Initiation:

    • The admin calls prepareChangeAllowPresaleStaking to initiate the change
    • A timestamp is recorded to enforce the waiting period
  2. Proposal Cancellation (Optional):

    • The admin can call cancelChangeAllowPresaleStaking to cancel the proposal at any time
  3. Change Confirmation:

    • The admin must wait 24 hours (1 day) after the proposal timestamp
    • After the waiting period, the admin calls confirmChangeAllowPresaleStaking to implement the change
    • The function verifies the waiting period has elapsed before toggling the presale staking flag

Allow Presale Staking Change